package com.note.user.dao.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.note.common.domain.File;
import org.apache.ibatis.annotations.Mapper;

/**
 * @projectName：wow-note
 * @package：com.note.common.mapper
 * @className：MinioMapper
 * @author：热伊木
 * @email：uyevan@163.com
 * @description：Minio文件上传验证Mapper
 * @date：2024-06-30 19:59
 * @version：1.0
 */
@Mapper
public interface MinioMapper extends BaseMapper<File> {
    default File existsAvatarMd5(String username, String md5) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("username", username);
        queryWrapper.eq("file_md5", md5);
        return this.selectOne(queryWrapper);
    }
}
